<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<!doctype html>
<html>
<head>
    <%@ include file="/common.jsp" %>
    <title>支付订单</title>
    <link rel="stylesheet" type="text/css" href="${ctx}/css/phone.css">
    <link rel="stylesheet" type="text/css" href="${ctx}/css/demos.css">
    <link rel="stylesheet" type="text/css" href="${ctx}/statics/aui/css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="${ctx }/css/weui.min.css"/>
</head>
<body>
<div class="page">
    <div class="page__hd">
        <h1 class="page__title" align="center">支付订单</h1>
    </div>
    <div class="page__bd">
        <div class="weui-form-preview">
            <div class="weui-form-preview__hd">
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">付款金额</label>
                    <em class="weui-form-preview__value">¥2400.00</em>
                </div>
            </div>
            <div class="weui-form-preview__bd">
                <div class="weui-form-preview__item">
                    <label class="weui-form-preview__label">订单编号</label>
                    <em class="weui-form-preview__value">SH201801041043279622</em>
                </div>
                <div class="weui-form-preview__item">
                    <br/>
                </div>
                <div class="weui-form-preview__item" align="center">
                    <%--扫一扫付款（元）
                    0.01--%>
                    <%--<img src="/lookqrNewCode?codeNo=20171122233963" style="width: 300px; height: 400px">--%>
                    <img src="/auth/lookPayUrl?payId=17&sign=b6bf3c36600e3c9959aa2aa3179ee443" width="168" height="168">
                </div>
            </div>
            <div style="padding: 10px 15px;">
                <div class="weui-form-preview__item" align="center">
                    <em class="weui-form-preview__value" style="font-size: 0.8em;">微信支付，长按二维码识别支付</em>
                </div>
                <div class="weui-form-preview__item" align="center">
                    <em class="weui-form-preview__value" style="font-size: 0.8em;">支付宝支付，请将二维码保存至手机相册后使用</em>
                </div>
            </div>
        </div>
        <br>
    </div>
</div>
<script>
    function findOrderStart() {
        var data = {
            payId: $("#payId").val(),//$("#payId").val()
        };
        $.ajax({
            type: "POST",
            url: "${ctx }/auth/findOrderStart",
            data: data,
            dataType: 'json',
            success: function (result) {
                console.log("=====:"+result.code);
                if (result.code == 0) {
                    console.log("===******==:"+result.status);
                    if(result.status==2) {
                        window.location.href = $("#callbackUrl").val();
                    }
                }
            }
        });
    }
    setInterval("findOrderStart()","5000");
</script>
</body>
</html>